﻿#include <algorithm>
#include <gtest/gtest.h>
#include <iostream>
#include <vector>

#include <learn/geom/geom_conic.h>
#include <learn/geom/geom_trimmed_curve.h>
#include <learn/utils/output.h>

using namespace xi;
using namespace xi::geom;
using namespace xi::math;

TEST(TestGeomConic, Ellipse)
{
    std::shared_ptr<Geom_Ellipse<3>> ellipse(
        new Geom_Ellipse<3>(Vec3{0.0, 0.0, 0.0}, Vec3{2.0, 0.0, 0.0}, Vec3{0.0, 1.0, 0.0}));
    std::shared_ptr<Geom_TrimmedCurve<3>> trimmedCurve(new Geom_TrimmedCurve<3>(ellipse, 0.0, Numeric::pi * 2));
}

TEST(TestGeomConic, Hyperbola)
{
    std::shared_ptr<Geom_Hyperbola<3>> hyperbola(
        new Geom_Hyperbola<3>(Vec3{0.0, 0.0, 0.0}, Vec3{1.0, 0.0, 0.0}, Vec3{0.0, 1.0, 0.0}));
    std::shared_ptr<Geom_TrimmedCurve<3>> trimmedCurve(new Geom_TrimmedCurve<3>(hyperbola, -Numeric::pi, Numeric::pi));
}

TEST(TestGeomConic, Parabola)
{
    std::shared_ptr<Geom_Parabola<3>> parabola(
        new Geom_Parabola<3>(Vec3{0.0, 0.0, 0.0}, Vec3{1.0, 0.0, 0.0}, Vec3{0.0, 1.0, 0.0}));
    std::shared_ptr<Geom_TrimmedCurve<3>> trimmedCurve(new Geom_TrimmedCurve<3>(parabola, -Numeric::pi, Numeric::pi));
}